package com.fr.report.script.function;

import com.fr.report.script.Function;
import com.fr.report.script.Function.Type;
import com.fr.report.script.NormalFunction;
import com.fr.report.script.core.FArray;

public class ARRAY extends NormalFunction
{
  public Object run(Object[] paramArrayOfObject)
  {
    return new FArray(paramArrayOfObject);
  }

  public Function.Type getType()
  {
    return Function.ARRAY;
  }

  public String getCN()
  {
    return "ARRAY(arg1,arg2...):返回一个由arg1,arg2,...组成的数组.\narg1,arg2,...:字符串或者数字.\n示例:\nARRAY(\"hello\") = [\"hello\"].\nARRAY(\"hello\",\"world\") = [\"hello\",\"world\"].\nARRAY(\"hello\",98) = [\"hello\",98].\nARRAY(67,98) = [67,98].";
  }

  public String getEN()
  {
    return "ARRAY(arg1,arg2,...): return an array that is the composition of arg1,arg2,.... \narg1,arg2,...: a string or a number.\nExample: \nARRAY(\"hello\") = [\"hello\"].\nARRAY(\"hello\",\"world\") = [\"hello\",\"world\"].\nARRAY(\"hello\",98) = [\"hello\",98].\nARRAY(67,98) = [67,98].\n";
  }
}